//
//  NSString+Common.h
//  Randomdoor
//
//  Created by ff on 2022/8/9.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (FMCommon)
-(BOOL)isBlankString;

- (NSAttributedString *)attributedStringWithHTMLString;

-(NSString *)componentsWithStr;

-(BOOL )timeWithResultTime;

-(NSString *)stringTranscoding;

-(NSString *)urlWithLayout;
//文字高度
+ (CGFloat)getStringHeightWithText:(NSString *)text font:(UIFont *)font viewWidth:(CGFloat)width;

//html转富文本
+ (NSMutableAttributedString *)getHtmlStringWithString:(NSString *)string;

//设置字体颜色与大小
+ (NSAttributedString *)formatHealthInfoWithHeartRate:(NSInteger)heartRate
                                          bloodOxygen:(NSInteger)bloodOxygen
                                              temper:(CGFloat)temper
                                                  hrv:(NSInteger)hrv;

+ (NSAttributedString *)formatHealthInfoWithHeartRate:(NSString *)firstString secondString:(NSString *)secondString;

//日期格式转化MM-DD HH:SS
-(NSString *)getPersonalityDateFormat;
//获取当前时间
+ (NSString *)currentTimeStr;

#pragma mark - 散列函数
/**
 *  计算MD5散列结果
 *
 *  终端测试命令：
 *  @code
 *  md5 -s "string"
 *  @endcode
 *
 *  <p>提示：随着 MD5 碰撞生成器的出现，MD5 算法不应被用于任何软件完整性检查或代码签名的用途。<p>
 *
 *  @return 32个字符的MD5散列字符串
 */
- (NSString *)md5String;

-(BOOL)containsAlphabetAndNumber;

-(NSInteger)stringWithBirthy;
@end

NS_ASSUME_NONNULL_END
